home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
C64
/
B-Business
/
(c)b4.d64
/
tips.c
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2007-02-04
|
10KB
|
249 lines
5 PRINT"[147]":POKE53281,1:POKE646,0
10 PRINT"TIPS FOR BEGINNERS":PRINT
20 PRINT"BY CLIFFORD JANSEN"
21 PRINT"TPUG #9743"
25 FOR T=1TO4000:NEXT
30 PRINT"[147]YES, I SAID.......":FORT=1TO2000:NEXT:PRINT
35 FORP=1TO20:PRINT"TIPS FOR BEGINNERS TIPS FOR BEGINNERS[146] ";
36 X=INT(15*RND(1)):POKE646,X:NEXTP
40 PRINTTAB(40)"[144] BY......................"
45 FORN=1TO6000:NEXT
46 FORN=1TO12:PRINT"[147][144]CLIFFORD JANSEN"
47 FORP=1TO100:NEXTP:NEXTN
50 FORN=1TO20:PRINT"[147]CLIFFORD JANSEN"
52 X=INT(15*RND(1)):Y=INT(15*RND(1))
53 POKE53280,X:POKE53281,Y
54 FORT=1TO100:NEXTT:NEXTN
55 POKE53281,1:POKE646,0
70 PRINT"[147]WOULD YOU LIKE TO LEARN A FEW TIPS ON"
75 PRINT"HOW THIS INTRODUCTION WAS PROGRAMMED?"
80 PRINT:PRINT"IT INCLUDES:"
85 PRINT"-CHANGING SCREEN COLOURS"TAB(40)"-CHANGING THE COLOUR OF PRINT"
90 PRINT"ON THE SCREEN"TAB(40):PRINT"-FILLING UP THE SCREEN WITH THE"
95 PRINT"SAME MESSAGE"
100 PRINT"-PLACING PRINT IN SPECIFIC PLACES"
105 PRINT"-FLASHING A NAME ON THE SCREEN"
110 PRINT"-IT WILL ALSO SUGGEST A WAY TO"
111 PRINT"SIMPLIFY TYPING LINES OF DATA"
120 PRINT:PRINT"THE FOLLOWING WERE ALSO USED:"
125 PRINT"1)POKES 2)FOR...TO 3)REVS ON[146] AND OFF 4)CURSORS ";
126 PRINT"5)RND 6)GET 7)ON"
129 PRINT:PRINT"PRESS RETURN[146]"
130 GETA$:IFA$=""GOTO130
135 IFA$=CHR$(13)THENPRINT"[147]"
140 PRINT:PRINT"WHERE POSSIBLE, THE RESULT OF RUNNING A PROGRAM WILL APPEAR AT THE";
145 PRINT" TOP OF THE SCREEN, WHILE THE PROGRAM LINES WILL APPEAR UNDER IT"
150 PRINT:PRINT"REFERENCE TO COMMODORE GUIDES WILL BE GIVEN, WHERE POSSIBLE"
155 PRINT:PRINT"YOU WILL BE GIVEN A REFERENCE TO THE LINE NO. IN THE";
160 PRINT" PROGRAM IN CASE YOU'D LIKE TO LIST IT"
161 PRINT"IN EXAMPLES:[146]"
162 PRINT"PRINT[211]=PRINT'SHIFTED CLR/HOME'"
163 PRINT"PRINTS[146]=PRINT'UNSHIFTED CLR/HOME'"
164 PRINT"' IS USED FOR WORDS IN QUOTES--'' [146]"
165 PRINT"PRESS RETURN[146]"
170 GETA$:IFA$=""GOTO170
175 IFA$=CHR$(13)THEN PRINT"[147]"
180 PRINTSPC(18)"MENU"
185 PRINT:PRINTSPC(7)"1. SCREEN & PRINT COLOURS"
190 PRINT:PRINTSPC(4)"2. PRINTING WITH TAB--;--,--SPC"
195 PRINT:PRINTSPC(9)"3. FILLING THE SCREEN"
200 PRINT:PRINTSPC(8)"4. FLASHING A NAME"
205 PRINT:PRINTSPC(14)"5. DATA LINES"
210 PRINT:PRINTSPC(11)"6. OTHER KEYWORDS"
211 PRINT:PRINTSPC(10)"7. END THE PROGRAM"
215 PRINTSPC(14)"PRESS A NUMBER[146]"
220 GETA$:IFA$=""GOTO220
225 IFA$<"1"ORA$>"7"THEN GOTO 220
230 M=VAL(A$)
235 ONMGOTO1000,2000,3000,4000,5000,6000,7000
1000 PRINT"[147]"SPC(16)"COLOURS[146]"
1001 PRINT:PRINT"IF YOU DON'T LIKE TYPING BLUE ON BLUE, YOU MAY CHANGE";
1005 PRINT" BOTH BACKGROUND & PRINT COLOURS BY RUN-ING:"
1010 PRINT:PRINT"POKE53281,#:POKE646,#:PRINT'[211]':NEW[146]"
1015 PRINT:PRINT"-WHERE: #=COLOUR NUMBER"
1020 PRINT" PRINT[211]=SHIFT CLR/HOME KEY"
1025 PRINT"-THE NUMBERS FOR COLOURS ARE FOUND IN:"
1030 PRINT" USERS GUIDE:P.61 AND REFERENCE GUIDE P.383"
1035 PRINT"-THE BORDER COLOUR IS CHANGED BY POKE53280,#"
1040 PRINT"-THE WORD 'NEW' IS ADDED, SO THAT THIS LINE #, WILL NOT";
1045 PRINT" APPEAR IN PROGRAMS THAT YOU BEGIN TO TYPE, ";
1050 PRINT"IF YOU USED PROGRAM (NOT DIRECT)MODE"
1051 PRINT"EXAMPLE:LINE 5 OF THIS PROGRAM[146]"
1055 PRINTSPC(9)"PRESS RETURN[146]"
1060 GETA$:IFA$=""THEN1060
1065 IFA$=CHR$(13)THENPRINT"[147]":GOTO1070
1070 PRINT:PRINT"HOW DID ALL THE SCREEN AND BORDER COLOURS CHANGE?"
1075 PRINT:PRINT"SINCE THERE ARE 16 COLOURS, NUMBERED FROM 0 TO 15"
1080 PRINT:PRINT"BY GIVING LINE NOS. AND RUN-ING:"
1085 PRINT"X=INT(15*RND(1)):Y=INT(15*RND(1))[146]"
1090 PRINT"FORN=1TO20:POKE53281,X:POKE53280,Y:NEXTN[146]"
1095 PRINT:PRINT"THE COMPUTER WILL RANDOMLY POKE NUMBERS BETWEEN 0 AND 15, 20 TIMES"
1100 PRINT"INTO APPROPRIATE PLACES"
1101 PRINT"E.G.LINES 50-54 WHICH ALSO INCLUDE THE FLASHING INSTRUCTIONS ";
1102 PRINT", TO BE DISCUSSED LATER[146]"
1105 PRINT"PRESS RETURN[146] TO RETURN TO MENU"
1110 GETA$:IFA$=""THEN1110
1115 IFA$=CHR$(13)THENPRINT"[147]":GOTO180
2000 PRINT"[147]":PRINT:PRINTSPC(8)"PRINTING--TABS--;--,--SPC[146]"
2001 PRINT:PRINT"THE WAY VARIABLES AND PHRASES APPEAR ON A SCREEN ";
2002 PRINT"ARE AFFECTED BY THE USE OF ; AND , "
2003 PRINT:PRINT"THE TOP LINE (YOU'RE ABOUT TO SEE) NUMBERS THE COLUMNS"
2004 PRINT:PRINT"THE PRINT ABOVE, IS PRODUCED BY THE LINES BELOW"
2005 PRINT:PRINT"WE MADE:A=1,B=2,C=3,D=4,E=5,F=6"
2006 PRINT:PRINT"PRESS RETURN[146]"
2007 GETA$:IFA$=""GOTO2007
2009 PRINT"[147]1234567890123456789012345678901234567890A=1,B=2,C=3,D=4,E=5,F=6[146]"
2010 A=1:B=2:C=3:D=4:E=5:F=6
2015 PRINTA;B,C
2020 PRINT;A;B,C
2025 PRINT,A;B,C:PRINT
2030 PRINTA;B,C,D,E,F
2035 PRINT"HI!"A;B,C
2045 PRINTA;B:PRINTC;D
2050 PRINTA;B;:PRINTC;D
2056 PRINT"PRINTA;B,C[146] PUTS B NEXT TO A,BUT C,10 SPACES FROM A"
2057 PRINT"PRINT;A;B,C[146] DOES THE SAME THING"
2058 PRINT"PRINT,A;B,C[146] PUTS A 10 COLS.AWAY(COL.12)"
2059 PRINT"PRINT[146] BY ITSELF,LEAVES A LINE BLANK"
2060 PRINT"PRINTA;B,C,D,E,F[146] PUTS B NEXT TO A AND SPACES THE REST"
2061 PRINT"PRINT'HI!'A;B,C[146] PUTS HI IN 1ST COL.
2062 [153]"PRINTA,B:PRINTC,DWAITPUTS THEM ON 2 LINES"
2063 [153]"PRINTA,B;:PRINTC,DWAITPUTS THEM ON 1 LINE"
2064 [153]"PRESS RETURNWAIT"
2065 [161]A$:[139]A$[178]""[167]2065
2066 [139]A$[178][199](13)[167] [137]2070
2070 [153]"LOADTHESE LINES ARE IN THE PROGRAM:2015-2050WAIT"
2071 [153]"SEE:USER'S GUIDE PP.28-29 & REFERENCE BOOK P.3WAIT"
2072 [153]"DO YOU WISH TO SEE THE COMPLETE TABLE AGAIN? (Y OR N)"
2073 [161]A$:[139]A$[178]""[167]2073
2074 [139]A$[178]"Y"[167]2009
2075 [153]"LOADTABS & SPCWAIT"
2080 [153]"1234567890123456789012345678901234567890"
2085 [153]"TORONTO"[163]8)"PET"[163]12)"USER'S"[163]19)"GROUP"
2090 [153]:[153]"TORONTO"[166]3)"PET"[166]3)"USER'S"[166]3)"GROUP"
2095 [153]"'TORONTO'TAB(8)'PET'TAB(12)'USER'S'TAB(19)'GROUP'"
2100 [153]"'TORONTO'SPC(3)'PET'SPC(3)'USER'S'SPC(3)'GROUP'WAIT"
2105 [153]"TAB PUTS THE BEGINNING OF WORDS IN THE EXACT COLUMN PLUS ONE"
2106 [153]"TAB CAN BE A NUMBER GREATER THAN 40 BUT IT CANNOT EXCEED 255"
2107 [153]"IF TAB IS 40--IT WILL PRINT IN COL.41 I.E.IT WILL START A NEW LINE"
2110 [153]"SPC LEAVES THE EXACT NUMBER OF SPACES BETWEEN WORDS"
2115 [153]"PRESS RETURNWAIT"
2120 [161]A$:[139]A$[178]""[137]2120
2125 [139]A$[178][199](13)[167][137]2130
2130 [153]"LOADSEE USER'S GUIDE P.129 REFERENCE GUIDE PP.88 & 83WAIT"
2135 [153]"DO YOU WISH TO SEE THE PREVIOUS TABLE AGAIN? (Y OR N)"
2140 [161]A$:[139]A$[178]""[137]2140
2145 [139]A$[178]"Y"[167]2075
2150 [153]"LOAD":[137]180
3000 [153]"LOADFILLING THE SCREEN"
3005 [129]P[178]1[164]20:[153]"FILLING THE SCREEN ";:[130]P
3010 [153]:[153]"WE'VE JUST FILLED HALF THE SCREEN BY:"
3015 [153]:[153]"FORP=1TO20:PRINT'FILLING THE SCREEN';:NEXTP"
3016 [153]:[153]"DON'T FORGET THE ; AFTER THE QUOTES"
3020 [153]: [153]"CHANGE 20 TO 40 TO FILL THE WHOLE SCREEN"
3025 [153]"PRESS RETURNWAIT"
3030 [161] A$:[139]A$[178]""[137]3030
3035 [139]A$[178][199](13)[167][153]"LOAD":[137]3040
3040 [153]:[153]"TO FILL THE SCREEN WITH YOUR NAME IN DIFFERENT PRINT COLOURS:"
3045 [153]"FORP=1TO20:PRINT 'YOUR NAME ';"
3050 [153]"X=INT(15*RND(1)):POKE646,X:NEXTPWAIT"
3055 [153]:[153]"THE NUMBERS FOR COLOURS ARE FOUND IN:"
3060 [153]"USER'S GUIDE P.61 AND REFEREMCE GUIDE P.383"
3062 [153]:[153]"SEE LINES 30,35,36,40 IN THIS PROGRAM"
3065 [153]:[153]"NOTE:WAITTHE COLOUR OF 1 LINE CAN BE CHANGED BY";
3070 [153]" HOLDING DOWN CTRLWAIT OR C<WAIT"
3075 [153]"AND A NUMBER BETWEEN 1 & 8";
3076 [153]" INSIDE THE QUOTE, JUST BEFORE YOUR NAME"
3080 [153]:[153]"SEE ALSO: USER'S GUIDE PP. 11-12 AND P.57"
3085 [153]:[153]"DO YOU WISH TO SEE THE PREVIOUS TABLE AGAIN? (Y OR N)"
3090 [161]A$:[139]A$[178]""[137]3090
3095 [139]A$[178]"Y"[167]3000
3100 [153]"LOAD":[137]180
4000 [129]P[178]1[164]100:[153]"LOADFLASHING":[130]P
4010 [129] Z[178]1[164]25:[153]"LOADFLASHING":[129]T[178]1[164]400:[130]T:[130]Z
4015 [153]"LOADFLASHINGWAIT"
4020 [153]"AND THE WINNER IS:"
4025 [129] P[178]1[164]200:[153]" "
4030 [153]"TPUG":[130]P
4035 [153]"THE FIRST--FLASHING--WAS DONE WITH:"
4040 [153]"FORP=1TO100:PRINT'(null)FLASHING':NEXTPWAIT"
4045 [153]"SOME CURSOR COMMANDS WERE INCLUDED TO POSITION THE WORD ON SCREEN"
4050 [153]"THE SECOND-FLASHING-WAS SLOWED DOWN BY INCLUDING A FOR...TOWAIT";
4055 [153]" TIMING LOOP"
4060 [153]"FORP=1TO25:PRINT'(null)FLASHING':FORT=1TO400:NEXTT:NEXTPWAIT"
4065 [153]"AGAIN, CURSOR COMMANDS WERE USED"
4070 [153]"THOSE 2 EXAMPLES USED (null) (CLR/HOME) TO CLEAR THE WHOLE ";
4075 [153]"SCREEN BETWEEN PRINTINGS"
4080 [153]"IF YOU ONLY WANT PART OF THE SCREEN TO FLASH, AS IN THE 3RD";
4085 [153]" EXAMPLE (TPUG), YOU HAVE TO PRINT A BLANK IN THE SAME POSI-TION";
4090 [153]" AS THE WORD";
4095 [153]". THIS IS DONE WITH THE SWAIT (HOME)KEY AND CURSOR COMMANDS"
4100 [153]"PRESS RETURNWAIT"
4105 [161]A$:[139]A$[178]""[137]4105
4110 [139]A$[178][199](13)[167] [153]"LOAD":[137]4115
4115 [153]"THE 3RD FLASHING WAS ACHIEVED BY:"
4120 [153]"FOR P=1TO200:PRINT'QQ]]]]]]]]]]]]]]]]]]WAIT SWAIT'"
4125 [153]"PRINT'QQ]]]]]]]]]]]]]]]]]]WAITTPUGSWAIT':NEXTP"
4130 [153]"STOPWHERE'QWAIT'=CRSR DOWN ---- ']WAIT'=CRSR RIGHT"
4135 [153]"AND 'SWAIT'=HOME (NOT SHIFTED)"
4140 [153]"DO YOU WISH TO SEE THE PREVIOUS PROGRAM AGAIN? (Y OR N)"
4145 [161]A$:[139]A$[178]""[137]4145
4150 [139] A$[178]"Y"[137]4000
4155 [153]"LOAD":[137]180
5000 [153]"LOADDATA LINESWAIT"
5005 [153]"ONE OF THE MOST BORING JOBS IN COPYING "
5010 [153]"A PROGRAM, IS COPYING THE DATA LINES."
5015 [153]"WHILE NOT MUCH CAN BE DONE ABOUT THIS "
5020 [153]"IT CAN BE SIMPLIFIED AS FOLLOWS:"
5021 [153]"PRESS RETURN"
5022 [161]A$:[139]A$[178]""[137]5022
5023 [139]A$[178][199](13)[167][153]"LOAD":[137]5025
5025 [153]"LOOK AT THE EXAMPLE IN THE USER'S GUIDE PP.88-89"
5030 [153]"LINE 90 HAS THE STATEMENT 'GOTO10' AND THEN LINES 100-120 ";
5035 [153]"HAVE THE WORD-DATA-"
5040 [153]"AFTER YOU'VE TYPED LINE 90 MOVE IT TO THE TOP OF THE SCREEN";
5041 [153]" USING CRSR DOWN"
5042 [153]"NOW MOVE THE CURSOR UP UNDER LINE 90"
5045 [153]"WITHOUT GIVING A LINE# TYPE:STOP "
5050 [153]"FORN=100TO120STEP5:PRINTN;'DATA':NEXTWAIT"
5055 [153]"THE NUMBERED LINES WITH THE WORD DATA WILL APPEAR"
5060 [153]"MOVE THE CURSOR UP TO THE LINE#100,"
5065 [153]"MOVE THE CURSOR ACROSS '100 DATA' AND INSERT THE DATA VALUES";
5070 [153]" 34,75,250 ETC."
5075 [153]"WHEN YOU PRESS THE 'RETURN KEY' THIS LINE WILL NOW BE";
5080 [153] " PART OF YOUR PROGRAM"
5090 [153] "NO OTHER LINES WILL BE PART OF THE PROG-RAM ";
5095 [153] "UNTIL THE CURSOR PASSES OVER THEMWAIT"
5100 [153]"PRESS RETURNWAIT"
5105 [161]A$:[139]A$[178]""[137]5105
5110 [139]A$[178][199](13)[167][153]"LOAD":[137]5115
5115 [153]"IMPORTANT NOTESWAIT"
5120 [153]"MAKE SURE THE DATA LINES (IN THE PROGRAM YOU ARE COPYING) ";
5121 [153]"ARE NUMBERED IN 5'S OR 10'S. OR CHANGE THE NUMBERING";
5122 [153]" TO SUIT YOUR NEEDS"
5125 [153]"DON'T ALLOW MORE THAN 20 DATA LINES TO APPEAR AT A TIME, BECAUSE"
5130 [153]"THE FIRST ONES WILL DIASAPPEAR OFF THE TOP OF THE SCREEN"
5135 [153]"YOU CAN ALWAYS REPEAT THE 'FOR TO' STATEMENT WHEN YOU NEED "
5140 [153] "MORE LINES."
5150 [153]"DO YOU WISH TO SEE THE PREVIOUS PROGRAM AGAIN? (Y OR N)
5155 GETA$:IFA$=""GOTO5155
5160 IFA$="Y"GOTO5000
5165 PRINT"[147]":GOTO180
6000 PRINT"[147]OTHER KEYWORDS[146]"
6005 PRINT"HERE ARE SOME OF THE PROGRAM LINE NUM- BERS WHERE DIFFERENT";
6010 PRINT" KEYWORDS WERE USED:"
6011 PRINT"YOU MAY LIST THEM TO SEE THEIR USES"
6015 PRINT"POKE:[146] 5,53,55."
6020 PRINT"FOR...TO:[146] 45,46,47."
6025 PRINT"REVS ON & OFF:[146] 1105,2006,2064."
6030 PRINT"CURSORS:[146] 10,20,21."
6035 PRINT"RND:[146] 36,52-53."
6040 PRINT"GET:[146] 170-175,1060-1065."
6045 PRINT"ON:[146] 230-235."
6050 PRINT"PRESS RETURN[146] TO RETURN TO MENU"
6055 GETA$:IFA$=""GOTO6055
6060 IFA$=CHR$(13)THENPRINT"[147]":GOTO180
7000 PRINT"[147]":PRINT:INPUT"PLEASE TYPE YOUR NAME";A$
7005 FORP=1TO30:PRINT"GOOD-BYE ";A$" ";A$"[146] ";A$
7010 X=INT(15*RND(1)):POKE646,X:NEXTP:POKE646,0